package com.sharemarking.wa.common.exception;



import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.common.SysHttpStatus;
import org.springframework.http.HttpStatus;


/**
 * 司机未认证返回418状态码
 */
public class DriverException extends  Exception {

    private static final long serialVersionUID = 1L;

    public static final HttpStatus HTTPSTATUS = HttpStatus.I_AM_A_TEAPOT;

    private ResponseParams<?> responseParams;

    private DriverException() {
    		
    }

    public ResponseParams<?> getResponseParams() {
        return responseParams;
    }
    
    public static DriverException create(ResponseParams<?> responseParams) {
    		DriverException re = new DriverException();
    		if(responseParams==null) {
    			responseParams=ResponseParams.error(SysHttpStatus.UN_DRIVER_VERIFY);
    		}
    		re.responseParams=responseParams;
    		return re;
    }
}
